package com.example.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author weiHuang.zhu
 * @Date 16/4/2023 下午2:42
 */
@Configuration
public class MySelfRule {
//    设置负载策略
    @Bean
    public IRule getRule() {
        return new RandomRule();
    }
}
